package p270jp.pxv.android.model;

import java.io.Serializable;
import p216hn.DefaultConstructorMarker;
import p270jp.pxv.android.legacy.constant.SearchDuration;
import p325m0.MutabilityOwnership;

/* compiled from: SearchDurationParameter.kt */
/* renamed from: jp.pxv.android.model.SearchDurationParameter */
/* loaded from: classes2.dex */
public class SearchDurationParameter implements Serializable {
    private final SearchDurationSetting customDurationSetting;
    private final boolean isCustomSetting;
    private final SearchDuration searchDuration;
    public static final Companion Companion = new Companion(null);
    public static final int $stable = 8;

    /* compiled from: SearchDurationParameter.kt */
    /* renamed from: jp.pxv.android.model.SearchDurationParameter$Companion */
    /* loaded from: classes2.dex */
    public static final class Companion {
        private Companion() {
        }

        public /* synthetic */ Companion(DefaultConstructorMarker eVar) {
            this();
        }

        public final SearchDurationParameter createCustomParameter(SearchDurationSetting searchDurationSetting) {
            MutabilityOwnership.m3745m(searchDurationSetting, "customSetting");
            return new SearchDurationParameter(SearchDuration.CUSTOM_DURATION, searchDurationSetting);
        }

        public final SearchDurationParameter createNormalParameter(SearchDuration searchDuration) {
            MutabilityOwnership.m3745m(searchDuration, "searchDuration");
            return new SearchDurationParameter(searchDuration, null);
        }
    }

    public SearchDurationParameter(SearchDuration searchDuration, SearchDurationSetting searchDurationSetting) {
        MutabilityOwnership.m3745m(searchDuration, "searchDuration");
        this.searchDuration = searchDuration;
        this.customDurationSetting = searchDurationSetting;
        this.isCustomSetting = searchDuration == SearchDuration.CUSTOM_DURATION;
    }

    public static final SearchDurationParameter createCustomParameter(SearchDurationSetting searchDurationSetting) {
        return Companion.createCustomParameter(searchDurationSetting);
    }

    public static final SearchDurationParameter createNormalParameter(SearchDuration searchDuration) {
        return Companion.createNormalParameter(searchDuration);
    }

    public SearchDurationNormalSettingCreator createSearchDurationNormalSettingCreator() {
        return SearchDurationNormalSettingCreator.Companion.createDefaultInstance();
    }

    public final SearchDurationSetting createSearchDurationSetting() {
        if (this.isCustomSetting) {
            return this.customDurationSetting;
        }
        return createSearchDurationNormalSettingCreator().create(this.searchDuration);
    }

    public final SearchDurationSetting getCustomDurationSetting() {
        return this.customDurationSetting;
    }

    public final SearchDuration getSearchDuration() {
        return this.searchDuration;
    }

    public final boolean isCustomSetting() {
        return this.isCustomSetting;
    }
}
